package org.giovanolli.mumi.entities;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

/**
 * The Class City.
 */
@Entity
@Table(name = "bill_identifier")
public class BillIdentifier implements Serializable {

	/** The Constant serialVersionUID. */
	private static final long serialVersionUID = -6863262638249146143L;

	/** The id. */
	@Id
	@GeneratedValue(strategy = GenerationType.TABLE, generator = "BILL_GEN")
	@TableGenerator(name = "BILL_GEN", allocationSize = 1)
	private Integer id;

	/**
	 * Gets the id.
	 * 
	 * @return the id
	 */
	public Integer getId() {
		return id;
	}

	/**
	 * Sets the id.
	 * 
	 * @param id
	 *            the new id
	 */
	public void setId(Integer id) {
		this.id = id;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return String.format("%08d", id);
	}

}
